/*
 * @ProjectName: 编程学习
 * @Copyright:   2019 HangZhou Ashe Dev, Ltd. All Right Reserved.
 * @address:     https://yiyuery.github.io/NoteBooks/
 * @date:        2020/2/23 11:25 上午
 * @description: 本内容仅限于编程技术学习使用，转发请注明出处.
 */
package com.yi.yier.boot.autoconfigure.codegenerator.constants;

import java.util.Objects;

/**
 * <p>
 *
 * </p>
 *
 * @author Ashe
 * @version V1.0.0
 * @date 2020/2/23 11:25 上午
 * @modificationHistory=========================逻辑或功能性重大变更记录
 * @modify By: {修改人}  2020/2/23
 * @modify reason: {方法名}:{原因}
 * ...
 */
public class CodeGenConstants {
    /**
     * 模版枚举类
     */
    public enum TemplateKey {
        VELOCITY("/codegenerator/velocity"),
        FREEMARKER("/codegenerator/freemarker");

        public String key;

        TemplateKey(String key) {
            this.key = key;
        }

        public static TemplateKey vOf(String key) {
            TemplateKey result = VELOCITY;
            for (TemplateKey e : TemplateKey.values()) {
                if (e.key.contains(key)) {
                    result = e;
                    break;
                }
            }
            return result;
        }
    }
}
